package sqlexplorer.ui.model;

public class TableNode implements IComposite{
	
	private String m_name;
	private Object[] m_children;
	private Object m_parent;
	
	public TableNode(String name){
		m_name=name;
	}
	
	public TableNode(String name,Object[] children,Object parent){
		m_name=name;
		m_children=children;
		m_parent=parent;
	}
	
	@Override
	public Object[] getChildren(){
		return m_children;
	}
	
	@Override
	public Object getParent(){
		return m_parent;
	}
	
	@Override
	public boolean hasChildren(){
		if((m_children!=null) && (m_children.length>0)){
			return true;
		}else{
			return false;
		}
	}
	
	public String getName(){
		return m_name;
	}
	
	public void setChildren(Object[] children){
		m_children=children;
	}
	
	public void setParent(Object parent){
		m_parent=parent;
	}
}
